(function() {
    var myApp = angular.module('myApp');

    myApp.controller("myController", function($scope, $rootScope, $log, myUserTableOption, reqDataByAjax) {
        // 设置用户表Option
        $scope.option = myUserTableOption;
        $scope.option.ajax = ajax;

        function ajax(data, callback, settings) {
            reqDataByAjax("/scheduling/api/manage/user/getall", data).then(function (ret) {
                callback({
                    "draw": data.draw,
                    "recordsFiltered": ret[1][0].recordsTotal,
                    "recordsTotal": ret[2][0].recordsFiltered,
                    "data": ret[0]
                });
            });
        }

    });


})();